package org.dialMsg.Pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mjoys.report.common.annotations.NotEmpty;
import com.mjoys.report.common.annotations.NotNull;
import lombok.Data;
import org.apache.commons.lang3.RandomUtils;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @author DPF
 */
@Data
public class MyFactSyncMqBody {

   // 静态变量缓存生成的大字符串（类加载时初始化，只执行一次）
//   private static final String LARGE_FOLLOW_REMARK;
//
//   // 静态代码块：类加载时执行，生成大字符串并缓存
//   static {
//      LARGE_FOLLOW_REMARK = generateLargeString();
//   }

   @NotNull
   private Integer manualCallLogId;
   private Integer aiCallLogId;
   @NotNull
   private Integer batchDetailId;
   @NotNull
   private Integer tenantId = 500;
   @NotNull
   private Long batchId = 93587L;
   @NotNull
   private Integer sceneId = 140;
   @NotEmpty
   private String lineNumber;
   @NotNull
   private Integer equipmentId = 1;
   private String targetPhone;
   private String targetCarrier = "中国电信";
   private String targetProCity = "河南-商丘";
   private String callRecordPath = "/sound/20250811/35/018037736335-7dbdb170-768f-11f0-8e3a-ebf1b0b2d75a.oga";
   @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   private LocalDateTime callTime;
   @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   private LocalDateTime brokenTime;
   private String customerName = "尉迟敬德";
   @NotNull
   private String dataOrgCode;

   @NotNull
   private String contId;
   private Integer durationOfSeatRing = 10;
   @NotNull
   private Integer callStatus;
   @NotNull
   private Integer seatId = 63516;
   private Integer numberType = 1;
   private Integer durationOfSeatConversing;
   @NotNull
   private Integer custSource = 4;
   @NotNull
   private Integer manualCallType = 1;
   @NotNull
   private Integer brokenUser = 1;


   @NotNull
   private Integer followerId;
   @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   private LocalDateTime followTime;
   @NotNull
   private Integer followResult;
   // 直接使用缓存的大字符串
   private String followRemark ="这是跟进备注，一段很长的文字描述，你又很忙，所以使用这样的方式给你拿捏了";
   @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   private LocalDateTime distributeTime;
   private Integer distributeSeatId = 63504;
   private Integer fromSeatId = 63504;

   // 生成大字符串的方法（只在类加载时执行一次）
//   private static String generateLargeString() {
//      StringBuilder sb = new StringBuilder();
//      // 生成约4MB的字符串 (4 * 1024 * 1024 = 4,194,304 字节)
//      String pattern = "这是跟进备注，一段很长的文字描述，你又很忙，所以使用这样的方式给你拿捏了 ";
//      int repetitions = 419 / pattern.length(); // 计算需要重复的次数
//
//      for (int i = 0; i < repetitions; i++) {
//         sb.append(pattern);
//      }
//
//      // 补充剩余字节以达到精确的4MB
//      int remainingBytes = 419 - sb.length();
//      for (int i = 0; i < remainingBytes; i++) {
//         sb.append('A');
//      }
//
//      return sb.toString();
//   }
}